import request from '@/utils/request'

export default {
    getEventList(page,limit,eventQuery) {
        return request({
            url:`/comp/findEvent/${page}/${limit}`,
            method:'post',
            data:eventQuery
          })
    },

    addEvent(event) {
        return request({
            url:`/comp/addEvent`,
            method:'post',
            data:event
          })
    },

    deleteEvent(id) {
        return request({
            url:`/comp/deleteEvent/${id}`,
            method:'get',
          })       
    },

    getEventById(id) {
        return request({
            url:`/comp/getEvent/${id}`,
            method:'get',
          })  
    },

    updateEvent(formData) {
        return request({
            url:`/comp/updateEvent`,
            method:'post',
            data:formData
          })        
    },

    getAllEvent() {
        return request({
            url:`/comp/eventList`,
            method:'get',
          })
    }


}

